SplitB Function
Creates a one-dimensional array from the String passed. SplitB is identical to Split, except that it treats the source as binary data.
Syntax
result = SplitB( source, [delimiter] )
Parameters | ||
source |
Source string to be parsed into an array. |
|
delimiter (Optional) |
Optional field delimiter used to parse Source into array elements. If delimiter is omitted, then a space is used as the delimiter. |
Notes
Use the SplitB function to create a new String array from a list of elements (or fields) that are separated by a delimiter. If the optional parameter, delimiter, is not passed, a single space is assumed as the delimiter. If the delimiter is an empty string, the source string is split into characters.
Examples
The first example specifies the comma delimiter and the second example uses the default delimiter. They place each field into an array element, producing a three-element array. The last example parses the string into individual characters.
anArray=SplitB ("Adam,Aardvark,Accountant",",")
anArray=SplitB("Adam Aardvark Accountant")
anArray=SplitB("Adam","")
//First two using the alternate syntax:
Dim s as String
s="Adam,Aardvark,Accountant"
anArray=s.SplitB (",") //produces 3-element array
anArray=s.SplitB("")//produces array of individual characters
See Also
String data type; Dim statement; Array, CountFieldsB, Join, NthFieldB, Ubound functions; Append, IndexOf, Insert, Pop, Redim, Remove, Shuffle, Sort, Sortwith methods; ParamArray keyword.